package com.itheima.stock.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @author zxh
 * @created 2024/12/11 15:48
 * @description
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@HeadRowHeight(value = 35) // 表头行高
@ContentRowHeight(value = 25) // 内容行高
@ColumnWidth(value = 15) // 列宽
public class StockExportDTO {
    @ExcelProperty(value = {"序号"},index = 0)
    private Long num;

    /**
     * 股票编码
     */
    @ExcelProperty(value = {"股票编码"},index = 1)
    private String code;
    /**
     * 股票名称
     */
    @ExcelProperty(value = {"股票名称"},index = 2)
    private String name;
    /**
     * 交易量
     */
    @ExcelProperty(value = {"交易量"},index = 3)
    private Long tradeAmt;
    /**
     * 前收盘价
     */
    @ExcelProperty(value = {"前收盘价"},index = 4)
    private BigDecimal preClosePrice;
    /**
     * 振幅
     */
    @ExcelProperty(value = {"振幅"},index = 5)
    private BigDecimal amplitude;


    /**
     * 当前日期
     */
    @ExcelProperty(value = {"当前日期"},index = 6)
    @DateTimeFormat("yyyy年MM月dd日")
    private LocalDate curDate;
    /**
     * 交易金额
     */
    @ExcelProperty(value = {"交易金额"},index = 7)
    private BigDecimal tradeVol;
    /**
     * 涨幅
     */
    @ExcelProperty(value = {"涨幅"},index = 8)
    private BigDecimal increase;
    /**
     * 涨跌
     */
    @ExcelProperty(value = {"涨跌"},index = 9)
    private BigDecimal upDown;
    /**
     * 当前价格
     */
    @ExcelProperty(value = {"当前价格"},index = 10)
    private BigDecimal tradePrice;


}
